#pragma once


#include <iostream>
#include <allegro5\allegro.h>

class Vector2
{
public:
	float X;
	float Y;

	Vector2 operator +(Vector2 v1);
	Vector2 operator *(Vector2 v1);
	Vector2 operator *(float f);
	Vector2 operator -(Vector2 v1);
	bool operator ==(const Vector2 &v);

	static Vector2 Zero() { return Vector2(0,0);}
	static Vector2 Right() {return Vector2(1,0);}
	static Vector2 Left() {return Vector2(-1,0);}
	static Vector2 Up() {return Vector2(0,-1);}
	static Vector2 Down() {return Vector2(0,1);}
	static Vector2 DownRight() {return Vector2(1,1);}
	static Vector2 DownLeft() {return Vector2(-1,1);}
	static Vector2 UpRight() {return Vector2(1,-1);}
	static Vector2 UpLeft() {return Vector2(-1,-1);}
	

	Vector2(float x, float y);
	Vector2(float value) ;
	Vector2();

	void Add(Vector2 v);
	void Subtract(Vector2 v);
	float Distance(Vector2 v);

	void Set(float x, float y);
};